/**
 * @license
 * Copyright Akveo. All Rights Reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 */
import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {NgModule} from '@angular/core';
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
import {ThemeModule} from './@theme/theme.module';
import {AppComponent} from './app.component';
import {AppRoutingModule} from './app-routing.module';
import {
    NbDatepickerModule,
    NbDialogModule,
    NbMenuModule,
    NbSidebarModule,
    NbToastrModule,
    NbWindowModule,
} from '@nebular/theme';
import {InterceptorService} from './services/interceptor.service';
import {CoreModule} from './@core/core.module';
import {LoginGuardService} from './services/login-guard.service';
import {FileUploadModule} from 'ng2-file-upload';
import {CommonModule, HashLocationStrategy, LocationStrategy} from '@angular/common';
import {DevUIModule} from 'ng-devui';
import {NgxEchartsModule} from 'ngx-echarts';

@NgModule({
    declarations: [AppComponent],
    imports: [
        BrowserModule,
        BrowserAnimationsModule,
        HttpClientModule,
        AppRoutingModule,
        NbSidebarModule.forRoot(),
        NbMenuModule.forRoot(),
        NbDatepickerModule.forRoot(),
        NbDialogModule.forRoot(),
        NbWindowModule.forRoot(),
        NbToastrModule.forRoot(),
        ThemeModule.forRoot(),
        CoreModule.forRoot(),
        FileUploadModule,
        CommonModule,
        DevUIModule,
        NgxEchartsModule,
    ],
    bootstrap: [AppComponent],
    providers: [{
        provide: HTTP_INTERCEPTORS,
        useClass: InterceptorService,
        multi: true,
    },
    {
        provide: LocationStrategy,
        useClass: HashLocationStrategy,
    },
    LoginGuardService, Storage],
})
export class AppModule {
}
